import server from "../util/request.js";

export function findAllTimeSlot(params) {
    return server({
        url: '/time/findAll',
        method: 'GET',
        params
    });
}

// 根据医生ID查询
export function findTimeSlotByDoctor(doctorId) {
    return server({
        url: `/time/findByDoctorId/${doctorId}`,
        method: 'GET'
    });
}

// 新增排班
export function addTimeSlot(data) {
    return server({
        url: '/time/insert',
        method: 'POST',
        data
    });
}

// 修改排班
export function updateTimeSlot(data) {
    return server({
        url: '/time/update',
        method: 'POST',
        data
    });
}

// 删除排班
export function deleteTimeSlot(id) {
    return server({
        url: `/time/del/${id}`,
        method: 'POST',
    });
}